﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aiFindPrimNum
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] nums = new int[100];
            nums[0] = 1;
            Console.WriteLine("The prime numbers between 2 and 100 are as following:");
            for(int i = 1; i < 100; i++)
            {
                if (nums[i] == 0)
                {
                    Console.WriteLine(i+1);
                    for(int j = i + 1; j < 100; j++)
                    {
                        if ((j+1) % (i+1) == 0)
                        {
                            nums[j] = 1;
                        }
                    }
                }
            }
            Console.ReadKey();
        }
    }
}
